#ifndef __GRAPH_H
#define __GRAPH_H

typedef float ELementType;
struct Node {
	ELementType ele;
	float weight;
	struct Node* next;
};

typedef struct Node * PtrToNode;
struct Graph {
	int capacity;
	int size;
	PtrToNode* nodeList;
};

typedef struct Graph* PtrToGraph;


PtrToNode createNode(ELementType x, float weight);
PtrToGraph initGraph(int capacity);
PtrToNode find(PtrToGraph graph, ELementType x);
void addNode(PtrToGraph graph, ELementType x);
void printAllNode(PtrToGraph graph);
void addEdge(PtrToGraph graph, ELementType x, ELementType y, float weight);

#endif